﻿<cfset mapping = event.getModelGlue().configuration.APPLICATIONMAPPING />

<cfset list = event.getValue( 'User.list' ) />

<cfoutput>

					<div class="titleWrap">
	                    <h1>All users</h1>
	                    <ul>
	                        <li class="standardForm">
	                            <select name="listmenu">
	                                <option selected="selected">Bulk Actions</option>
	                                <option>Delete Selected</option>
	                                <option>Edit Selected</option>
	                            </select>
	                        </li>
	                        <li class="seperator"><img src="#mapping#/assets/img/icons/add.png" alt="add" /> <a href="#event.linkTo( 'new.User' )#">Add New</a></li>
	                    </ul>
	                </div>
	                <table class="listing fluid" cellpadding="0" cellspacing="0">
	                  <tbody>
	                    <tr>
	                      <th class="left"><input type="checkbox" name="checkbox2" value="checkbox" /></th>
	                      <th>Name<img src="#mapping#/assets/img/icons/arrow_down.png" alt="down" /><img src="#mapping#/assets/img/icons/arrow_up.png" alt="up" /></th>
	                      <th>Status<img src="#mapping#/assets/img/icons/arrow_down.png" alt="down" /><img src="#mapping#/assets/img/icons/arrow_up.png" alt="up" /></th>
	                      <th>Email<img src="#mapping#/assets/img/icons/arrow_down.png" alt="down" /><img src="#mapping#/assets/img/icons/arrow_up.png" alt="up" /></th>
	                      <th>Actions</th>
	                    </tr>
						
						<cfset i = 0 />
						<cfset iterator = list.iterator() />
						
						<cfloop condition="#iterator.hasNext()#">
						
						<cfset next = iterator.next() />
						
						<cfset i = i+1 />
						
	                    <tr class="#IIF( i mod 2 eq 0, DE("row1"), DE("row2") )#">
	                      <td><input type="checkbox" name="checkbox2" value="#next.getIdUser()#" /></td>
	                      <td>#next.getName()#</td>
	                      <td>#next.getStatus()#</td>
	                      <td>#next.getEmail()#</td>
	                      <td>
	                      	<cfif next.getEditable()>
							<a href="#event.linkTo( 'edit.User' )#/idUser/#next.getIdUser()#">
	                      	<img src="#mapping#/assets/img/icons/page_edit.png" alt="edit" width="16" height="16" />
							</a> 
							</cfif>
						  </td>
	                    </tr>
						
						</cfloop>
	                    
	                  </tbody>
	                </table>
					<!---
	                <div class="paginationWrap">
	                    <ul>
	                        <li class="previous-off">&laquo;Previous</li>
	                        <li class="active">1</li>
	                        <li><a href="/page/2">2</a></li>
	                        <li><a href="/page/3">3</a></li>
	                        <li><a href="/page/4">4</a></li>
	                        <li><a href="/page/5">5</a></li>
	                        <li><a href="/page/6">6</a></li>
	                        <li><a href="/page/7">7</a></li>
	                        <li class="next"><a href="/page/8">Next &raquo;</a></li>
	                    </ul>
	                </div>
					--->
					<br/>
					
</cfoutput>